from django.db import models
from common.db import BaseModel
# Create your models here.
class Cart(BaseModel):
    """购物车模型"""
    user=models.ForeignKey('user.User',on_delete=models.CASCADE,blank=True)
    goods=models.ForeignKey('goods.Goods',verbose_name='商品ID',on_delete=models.CASCADE)
    number=models.SmallIntegerField(verbose_name='商品数量',default=1,blank=True)
    is_checked=models.BooleanField(verbose_name='是否选中',default=True,blank=True)
    class Meta:
        db_table='cart'
        verbose_name='购物车'
        verbose_name_plural=verbose_name